Gluing schemes